#include<bits/stdc++.h>
#define ll long long
#define ull unsigned long long
using namespace std;

const ll N = 110;
const ll mod = 998244353;

ll n, l;
char offset = 'a';
ll tr[N][26], fail[N], ed[N], idx;
ll f[N][N][300];

void insert(const string& s, ll id)
{
    ll p = 0;
    for (char it : s) {
        ll c = it - offset;
        if (tr[p][c] == 0) tr[p][c] = ++idx;
        p = tr[p][c];
    }
    ed[p] |= 1 << id;
}

void setfail()
{
    queue<ll> q;
    for (ll i = 0;i < 26;i++) if (tr[0][i]) { q.push(tr[0][i]); }
    while (!q.empty()) {
        ll now = q.front();q.pop();
        for (ll i = 0;i < 26;i++)
            if (tr[now][i]) {
                fail[tr[now][i]] = tr[fail[now]][i];
                ed[tr[now][i]] |= ed[fail[tr[now][i]]];
                q.push(tr[now][i]);
            } else tr[now][i] = tr[fail[now]][i];
    }
}

void solve()
{
    cin >> n >> l;
    for (ll i = 0;i < n;i++) {
        string s; cin >> s;
        insert(s, i);
    }
    setfail();

    memset(f, 0, sizeof f);
    f[0][0][0] = 1;
    for (ll i = 0;i < l;i++)
        for (ll j = 0;j <= idx;j++)
            for (ll k = 0;k < (1 << n);k++) {
                if (f[i][j][k] == 0) continue;
                for (ll c = 0;c < 26;c++) {
                    ll ch = tr[j][c];
                    ll mark = k | ed[ch];
                    (f[i + 1][ch][mark] += f[i][j][k]) %= mod;
                }
            }

    ll sum = 0;
    for (ll i = 0;i <= idx;i++)
        (sum += f[l][i][(1 << n) - 1]) %= mod;
    cout << sum;
}

signed main()
{
    //ios::sync_with_stdio(0);
    //cin.tie(0);cout.tie(0);
#define ONLINE_JUDGE
#ifndef ONLINE_JUDGE
    std::istringstream in(R"()");
    std::cin.rdbuf(in.rdbuf());
#endif
    ll T = 1;
    //cin>>T;
    for (ll i = 1;i <= T;i++) {
        solve();
    }
}